﻿using AnjLab.SyncIT.Core.Data.Outlook;
using System;

namespace AnjLab.SyncIT.Core.Api
{
    public interface ISourceTaskDao: IDisposable
    {
        /// <summary>
        /// Returns changed Task IDs
        /// </summary>
        /// <returns></returns>
        string[] GetChangedTasks();

        ISourceTask Get(string taskID);
        bool CanTrackTaskLifetime { get; }
        /// <summary>
        /// Must throw an exception on bad connection
        /// </summary>
        void CheckConnection();
        bool SupportsBackSynchronization { get; }
        /// <summary>
        /// Copy outlookTask data back to the corresponding source task and 
        /// update the source with a new task
        /// </summary>
        /// <param name="task">Task from the Source</param>
        /// <param name="outlookTask">Modified source task copy from Outlook</param>
        void MergeTasks(ISourceTask task, IOutlookItem outlookTask);
    }
}
